package jinyilw.swing.rlaf.ui;

import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import java.awt.Dimension;
import java.awt.Graphics;

/**
 * @author Jinyi
 */
public class RPopupMenuSeparatorUI extends RSeparatorUI
{

	public static ComponentUI createUI(JComponent c)
	{
		return new RPopupMenuSeparatorUI();
	}

	@Override
	public void paint(Graphics g, JComponent c)
	{
		getColor(c);
		int width = c.getWidth();
		g.setColor(shadow);
		// g.drawLine(1, 0, width - 1, 0);
		g.drawLine(1, 1, width - 1, 1);
		g.setColor(highlight);
		g.drawLine(1, 1, width - 1, 1);
	}

	@Override
	public Dimension getPreferredSize(JComponent c)
	{
		return new Dimension(0, 2);
	}
}
